home *** CD-ROM | disk | FTP | other *** search
- #import "poker.h"
-
- @implementation HoldEmHighHand
-
- - (id)init {
- int i;
- self = [super init];
- cards = [[NSMutableArray allocWithZone:[self zone]] init];
- for (i = 0; i < 5; i++)
- [cards addObject: [[Card allocWithZone:[self zone]] init]];
- return self;
- }
-
- - (void)dealloc {
- [cards release];
- [super dealloc];
- }
-
- - (NSArray *)cards {
- return cards;
- }
-
- - (void)setCard:(Card *)card atIndex:(int)index {
- Card *oldCard = [cards objectAtIndex:index];
- [cards replaceObjectAtIndex:index withObject:card];
- // [oldCard release];
- }
-
- @end